/*
 * zachutil_Charbuffer.cpp
 *
 *   Created on: 2011-9-25
 *       Author: 左白
 *  Description: CharBuffer和TokenBuffer的实现
 */
#include "util.h"
#include <map>

using std::map;

namespace zach
{
namespace util
{
#if (1) /* StringBuffer实现 */
void StringBuilder::pushChar( Char c )
{
	_buffer.push_back( c );
}

void StringBuilder::build()
{
	_lastBuild = getString( _buffer );
	_buffer.clear();
}

void StringBuilder::pushChars( const CharVector& chars )
{
	_buffer.insert( _buffer.end(), chars.begin(), chars.end() );
}

String StringBuilder::lastBuild() const
{
	return _lastBuild;
}
#endif /* StringBuffer实现 */
}
}
